package com.nondo.dean.pay.mapper;

import com.nondo.dean.pay.domain.PayOrder;
import com.nondo.dean.pay.domain.PayOrderExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface PayOrderMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=PayOrderSqlProvider.class, method="countByExample")
    long countByExample(PayOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @DeleteProvider(type=PayOrderSqlProvider.class, method="deleteByExample")
    int deleteByExample(PayOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Delete({
        "delete from pay_order",
        "where pay_order_id = #{payOrderId,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String payOrderId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Insert({
        "insert into pay_order (pay_order_id, mch_id, ",
        "mch_order_no, channel_id, ",
        "amount, currency, ",
        "status, client_ip, ",
        "device, subject, ",
        "body, extra, channel_mch_id, ",
        "channel_order_no, err_code, ",
        "err_msg, param1, ",
        "param2, notify_url, ",
        "notify_count, last_notify_time, ",
        "expire_time, pay_succ_time, ",
        "create_time, update_time)",
        "values (#{payOrderId,jdbcType=VARCHAR}, #{mchId,jdbcType=VARCHAR}, ",
        "#{mchOrderNo,jdbcType=VARCHAR}, #{channelId,jdbcType=VARCHAR}, ",
        "#{amount,jdbcType=BIGINT}, #{currency,jdbcType=VARCHAR}, ",
        "#{status,jdbcType=TINYINT}, #{clientIp,jdbcType=VARCHAR}, ",
        "#{device,jdbcType=VARCHAR}, #{subject,jdbcType=VARCHAR}, ",
        "#{body,jdbcType=VARCHAR}, #{extra,jdbcType=VARCHAR}, #{channelMchId,jdbcType=VARCHAR}, ",
        "#{channelOrderNo,jdbcType=VARCHAR}, #{errCode,jdbcType=VARCHAR}, ",
        "#{errMsg,jdbcType=VARCHAR}, #{param1,jdbcType=VARCHAR}, ",
        "#{param2,jdbcType=VARCHAR}, #{notifyUrl,jdbcType=VARCHAR}, ",
        "#{notifyCount,jdbcType=TINYINT}, #{lastNotifyTime,jdbcType=BIGINT}, ",
        "#{expireTime,jdbcType=BIGINT}, #{paySuccTime,jdbcType=BIGINT}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(PayOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @InsertProvider(type=PayOrderSqlProvider.class, method="insertSelective")
    int insertSelective(PayOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=PayOrderSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="pay_order_id", property="payOrderId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="mch_order_no", property="mchOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_id", property="channelId", jdbcType=JdbcType.VARCHAR),
        @Result(column="amount", property="amount", jdbcType=JdbcType.BIGINT),
        @Result(column="currency", property="currency", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="client_ip", property="clientIp", jdbcType=JdbcType.VARCHAR),
        @Result(column="device", property="device", jdbcType=JdbcType.VARCHAR),
        @Result(column="subject", property="subject", jdbcType=JdbcType.VARCHAR),
        @Result(column="body", property="body", jdbcType=JdbcType.VARCHAR),
        @Result(column="extra", property="extra", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_mch_id", property="channelMchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_order_no", property="channelOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="err_code", property="errCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="err_msg", property="errMsg", jdbcType=JdbcType.VARCHAR),
        @Result(column="param1", property="param1", jdbcType=JdbcType.VARCHAR),
        @Result(column="param2", property="param2", jdbcType=JdbcType.VARCHAR),
        @Result(column="notify_url", property="notifyUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="notify_count", property="notifyCount", jdbcType=JdbcType.TINYINT),
        @Result(column="last_notify_time", property="lastNotifyTime", jdbcType=JdbcType.BIGINT),
        @Result(column="expire_time", property="expireTime", jdbcType=JdbcType.BIGINT),
        @Result(column="pay_succ_time", property="paySuccTime", jdbcType=JdbcType.BIGINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<PayOrder> selectByExampleWithRowbounds(PayOrderExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=PayOrderSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="pay_order_id", property="payOrderId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="mch_order_no", property="mchOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_id", property="channelId", jdbcType=JdbcType.VARCHAR),
        @Result(column="amount", property="amount", jdbcType=JdbcType.BIGINT),
        @Result(column="currency", property="currency", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="client_ip", property="clientIp", jdbcType=JdbcType.VARCHAR),
        @Result(column="device", property="device", jdbcType=JdbcType.VARCHAR),
        @Result(column="subject", property="subject", jdbcType=JdbcType.VARCHAR),
        @Result(column="body", property="body", jdbcType=JdbcType.VARCHAR),
        @Result(column="extra", property="extra", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_mch_id", property="channelMchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_order_no", property="channelOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="err_code", property="errCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="err_msg", property="errMsg", jdbcType=JdbcType.VARCHAR),
        @Result(column="param1", property="param1", jdbcType=JdbcType.VARCHAR),
        @Result(column="param2", property="param2", jdbcType=JdbcType.VARCHAR),
        @Result(column="notify_url", property="notifyUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="notify_count", property="notifyCount", jdbcType=JdbcType.TINYINT),
        @Result(column="last_notify_time", property="lastNotifyTime", jdbcType=JdbcType.BIGINT),
        @Result(column="expire_time", property="expireTime", jdbcType=JdbcType.BIGINT),
        @Result(column="pay_succ_time", property="paySuccTime", jdbcType=JdbcType.BIGINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<PayOrder> selectByExample(PayOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Select({
        "select",
        "pay_order_id, mch_id, mch_order_no, channel_id, amount, currency, status, client_ip, ",
        "device, subject, body, extra, channel_mch_id, channel_order_no, err_code, err_msg, ",
        "param1, param2, notify_url, notify_count, last_notify_time, expire_time, pay_succ_time, ",
        "create_time, update_time",
        "from pay_order",
        "where pay_order_id = #{payOrderId,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="pay_order_id", property="payOrderId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="mch_order_no", property="mchOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_id", property="channelId", jdbcType=JdbcType.VARCHAR),
        @Result(column="amount", property="amount", jdbcType=JdbcType.BIGINT),
        @Result(column="currency", property="currency", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="client_ip", property="clientIp", jdbcType=JdbcType.VARCHAR),
        @Result(column="device", property="device", jdbcType=JdbcType.VARCHAR),
        @Result(column="subject", property="subject", jdbcType=JdbcType.VARCHAR),
        @Result(column="body", property="body", jdbcType=JdbcType.VARCHAR),
        @Result(column="extra", property="extra", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_mch_id", property="channelMchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_order_no", property="channelOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="err_code", property="errCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="err_msg", property="errMsg", jdbcType=JdbcType.VARCHAR),
        @Result(column="param1", property="param1", jdbcType=JdbcType.VARCHAR),
        @Result(column="param2", property="param2", jdbcType=JdbcType.VARCHAR),
        @Result(column="notify_url", property="notifyUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="notify_count", property="notifyCount", jdbcType=JdbcType.TINYINT),
        @Result(column="last_notify_time", property="lastNotifyTime", jdbcType=JdbcType.BIGINT),
        @Result(column="expire_time", property="expireTime", jdbcType=JdbcType.BIGINT),
        @Result(column="pay_succ_time", property="paySuccTime", jdbcType=JdbcType.BIGINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    PayOrder selectByPrimaryKey(String payOrderId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=PayOrderSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") PayOrder record, @Param("example") PayOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=PayOrderSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") PayOrder record, @Param("example") PayOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=PayOrderSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(PayOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Update({
        "update pay_order",
        "set mch_id = #{mchId,jdbcType=VARCHAR},",
          "mch_order_no = #{mchOrderNo,jdbcType=VARCHAR},",
          "channel_id = #{channelId,jdbcType=VARCHAR},",
          "amount = #{amount,jdbcType=BIGINT},",
          "currency = #{currency,jdbcType=VARCHAR},",
          "status = #{status,jdbcType=TINYINT},",
          "client_ip = #{clientIp,jdbcType=VARCHAR},",
          "device = #{device,jdbcType=VARCHAR},",
          "subject = #{subject,jdbcType=VARCHAR},",
          "body = #{body,jdbcType=VARCHAR},",
          "extra = #{extra,jdbcType=VARCHAR},",
          "channel_mch_id = #{channelMchId,jdbcType=VARCHAR},",
          "channel_order_no = #{channelOrderNo,jdbcType=VARCHAR},",
          "err_code = #{errCode,jdbcType=VARCHAR},",
          "err_msg = #{errMsg,jdbcType=VARCHAR},",
          "param1 = #{param1,jdbcType=VARCHAR},",
          "param2 = #{param2,jdbcType=VARCHAR},",
          "notify_url = #{notifyUrl,jdbcType=VARCHAR},",
          "notify_count = #{notifyCount,jdbcType=TINYINT},",
          "last_notify_time = #{lastNotifyTime,jdbcType=BIGINT},",
          "expire_time = #{expireTime,jdbcType=BIGINT},",
          "pay_succ_time = #{paySuccTime,jdbcType=BIGINT},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP}",
        "where pay_order_id = #{payOrderId,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(PayOrder record);
}